<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>

<?php if ($this->title == "联系我们专用页面") {; ?>
    <script src="http://api.map.baidu.com/getscript?v=2.0&ak=OYOgQj21cAuMEcsLq6FUhDEMiardEaNV"></script>
    <div class="container" style="margin-top: 25px">
        <div class="row">
            <div class="col-md-6" style="margin-top: 100px">
                <h2 style="font-weight: bold;color: #ff5454;">我们会尽快给您一个满意的答复！</h2>
                <br>
                <p class="ppp">地址：成都市天府大道天府新区南段2039号 天府菁蓉大厦B座6楼 (地铁一号线海昌路站B口500米)</p>
                <p></p>
                <p class="ppp">商务总监：159-8239-9433 (微信同号) 王先生</p>
                <p></p>
                <p class="ppp">公司邮箱：cute_king_tech@qq.com</p>
                <p></p>
                <p class="ppp">QQ咨询：393459222</p>
                <p></p>
                <div style="width:360px;height:360px;border:#ccc solid 1px;" id="dituContent"></div>
            </div>
            <div class="col-md-6" >
                <?php $this->comments()->to($comments); ?>
                <!-- comment form -->
                <div id="addcomment" class="blog-comment-form-main" style="margin-top: 80px">
                    <div class="blog-comment-form">
                        <form action="<?php $this->commentUrl() ?>" method="post" role="form">
                            <input type="text" class="thght" name="author" placeholder="您的姓名 *" value="<?php $this->remember('author'); ?>" required="">
                            <!-- end input -->
                            <!-- input  -->
                            <input type="text" class="thght" name="mail" placeholder="您的联系方式 * 比如：微信：XXXX QQ：XXXX 电话：XXX" value="<?php $this->remember('mail'); ?>" required="">
                            <!-- end input -->
                            <!-- input  -->
                            <input type="text" class="thght" name="url" placeholder="您的公司名称 *" value="<?php $this->remember('url'); ?>" required="">
                            <!-- end input -->
                            <!-- textarea  -->
                            <textarea style="height: 250px;text-transform:none;" name="text" placeholder="您的详细需求 *" required=""></textarea>
                            <!-- end textarea  -->
                            <!-- required  -->
                            <!--<span class="required">*选项为必填</span>-->
                            <!-- end required  -->
                            <!-- button  -->
                            <input type="submit" value="提交" style="width: 40pc;margin-top: 1px;" class="btn btn-info no-margin-bottom">
                            <!-- end button  -->
                            <!-- Security -->
                            <?php $security = $this->widget('Widget_Security'); ?>
                            <input type="hidden" name="_" value="<?php echo $security->getToken($this->request->getReferer())?>"></p>
                        </form>
                    </div>
                </div>
                <!-- end comment form -->
            </div>
        </div>
    </div>

    <div id="di_float">
        <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=393459222&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:1073850525:53" alt="点击这里给我发消息" title="点击这里给我发消息"/></a>
    </div>

    <style>
        .thght{
            height: 55px;
            text-transform:none !important;
        }
        .ppp{
            margin: 0 0 4px 0;
            font-size: 1.4em;
            font-weight: bold;
            color: #888888;
        }
        #di_float{
            width:100px;
            height:150px;
            position:fixed;
            right:0;
            top:100px;
        }
    </style>
    <script type="text/javascript">
        //创建和初始化地图函数：
        function initMap(){
            createMap();//创建地图
            setMapEvent();//设置地图事件
            addMapControl();//向地图添加控件
            addMarker();//向地图中添加marker
            addRemark();//向地图中添加文字标注
        }

        //创建地图函数：
        function createMap(){
            var map = new BMap.Map("dituContent");//在百度地图容器中创建一个地图
            var point = new BMap.Point(104.078623,30.497719);//定义一个中心点坐标
            map.centerAndZoom(point,18);//设定地图的中心点和坐标并将地图显示在地图容器中
            window.map = map;//将map变量存储在全局
        }

        //地图事件设置函数：
        function setMapEvent(){
            map.enableDragging();//启用地图拖拽事件，默认启用(可不写)
            map.enableScrollWheelZoom();//启用地图滚轮放大缩小
            map.enableDoubleClickZoom();//启用鼠标双击放大，默认启用(可不写)
            map.enableKeyboard();//启用键盘上下左右键移动地图
        }

        //地图控件添加函数：
        function addMapControl(){
            //向地图中添加缩放控件
            var ctrl_nav = new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_LEFT,type:BMAP_NAVIGATION_CONTROL_LARGE});
            map.addControl(ctrl_nav);
            //向地图中添加缩略图控件
            var ctrl_ove = new BMap.OverviewMapControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT,isOpen:1});
            map.addControl(ctrl_ove);
            //向地图中添加比例尺控件
            var ctrl_sca = new BMap.ScaleControl({anchor:BMAP_ANCHOR_BOTTOM_LEFT});
            map.addControl(ctrl_sca);
        }

        //标注点数组
        var markerArr = [{title:"天府菁蓉大厦B座6楼",content:"我的备注",point:"104.078614|30.497968",isOpen:0,icon:{w:21,h:21,l:0,t:0,x:6,lb:5}}
        ];
        //创建marker
        function addMarker(){
            for(var i=0;i<markerArr.length;i++){
                var json = markerArr[i];
                var p0 = json.point.split("|")[0];
                var p1 = json.point.split("|")[1];
                var point = new BMap.Point(p0,p1);
                var iconImg = createIcon(json.icon);
                var marker = new BMap.Marker(point,{icon:iconImg});
                var iw = createInfoWindow(i);
                var label = new BMap.Label(json.title,{"offset":new BMap.Size(json.icon.lb-json.icon.x+10,-20)});
                marker.setLabel(label);
                map.addOverlay(marker);
                label.setStyle({
                    borderColor:"#808080",
                    color:"#333",
                    cursor:"pointer"
                });

                (function(){
                    var index = i;
                    var _iw = createInfoWindow(i);
                    var _marker = marker;
                    _marker.addEventListener("click",function(){
                        this.openInfoWindow(_iw);
                    });
                    _iw.addEventListener("open",function(){
                        _marker.getLabel().hide();
                    })
                    _iw.addEventListener("close",function(){
                        _marker.getLabel().show();
                    })
                    label.addEventListener("click",function(){
                        _marker.openInfoWindow(_iw);
                    })
                    if(!!json.isOpen){
                        label.hide();
                        _marker.openInfoWindow(_iw);
                    }
                })()
            }
        }
        //创建InfoWindow
        function createInfoWindow(i){
            var json = markerArr[i];
            var iw = new BMap.InfoWindow("<b class='iw_poi_title' title='" + json.title + "'>" + json.title + "</b><div class='iw_poi_content'>"+json.content+"</div>");
            return iw;
        }
        //创建一个Icon
        function createIcon(json){
            var icon = new BMap.Icon("http://app.baidu.com/map/images/us_mk_icon.png", new BMap.Size(json.w,json.h),{imageOffset: new BMap.Size(-json.l,-json.t),infoWindowOffset:new BMap.Size(json.lb+5,1),offset:new BMap.Size(json.x,json.h)})
            return icon;
        }
        //文字标注数组
        var lbPoints = [{point:"104.078183|30.497299",content:"我的标记"}
        ];
        //向地图中添加文字标注函数
        function addRemark(){
            for(var i=0;i<lbPoints.length;i++){
                var json = lbPoints[i];
                var p1 = json.point.split("|")[0];
                var p2 = json.point.split("|")[1];
                var label = new BMap.Label("<div style='padding:2px;'>"+json.content+"</div>",{point:new BMap.Point(p1,p2),offset:new BMap.Size(3,-6)});
                map.addOverlay(label);
                label.setStyle({borderColor:"#999"});
            }
        }

        initMap();//创建和初始化地图
    </script>
<?php
    return;
}; ?>


        <!-- content section -->
        <section class="wow fadeIn">
            <div class="container">
                <div class="row">
                    <!-- content  -->
                    <div class="col-md-8 col-sm-8">
                        <!-- post title  -->
                        <h2 class="blog-details-headline text-black"><?php $this->title(); ?></h2>
                        <!-- end post title  -->
                        <!-- post date and categories  -->
                        <div class="blog-date no-padding-top"><a href="<?php $this->author->permalink(); ?>" rel="author"><?php $this->author(); ?></a> 发布 | <?php $this->date('Y-m-d'); ?> | <?php $this->category(','); ?> </div>
                        <!-- end date and categories   -->
                        <!-- post details text -->
                        <div class="blog-details-text">
                            <p><?php parseContent($this); ?></p>
                            <div class="blog-date no-padding-top margin-eight no-margin-bottom">
                                <!-- post tags -->
                                <h5 class="widget-title margin-one no-margin-top">标签</h5>
                                <?php $this->tags(',', true, '<a>没有标签</a>'); ?></div>
                            <!-- end post tags -->
                        </div>
                        <!-- end post details text -->
                        <!-- about author -->
                        <div class="text-center margin-eight no-margin-bottom about-author text-left bg-gray">
                            <div class="blog-comment text-left clearfix no-margin">
                                <!-- author text -->
                                <div class="comment-text overflow-hidden position-relative">
                                    <p class="blog-date no-padding-top">&copy 著作权归作者所有</p>
                                    <p class="about-author-text no-margin">本文由 <?php $this->options->title();?> 创作，采用 <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="external nofollow">知识共享署名4.0</a> 国际许可协议进行许可，本站文章除注明转载/出处外，均为本站原创或翻译，转载前请务必署名。</p>
                                </div>
                                <!-- end author text -->
                            </div>
                        </div>
                        <!-- end about author -->
                        <!-- social icon -->
                        <div class="text-center border-bottom margin-ten padding-four no-margin-top">
							<a href="#weixin" class="btn social-icon social-icon-large button modal-popup" data-tooltip="分享至微信"><i class="fa fa-weixin"></i></a>
							<a target="_blank" href="http://service.weibo.com/share/share.php?url=<?php $this->permalink() ?>&amp;appkey=<?php $this->options->title();?>/&amp;title=<?php $this->title() ?>&amp;pic=<?php echo showThumb($this,true); ?>" class="btn social-icon social-icon-large button"  data-tooltip="分享至新浪微博"><i class="fa fa-weibo"></i></a>
							<a href="http://connect.qq.com/widget/shareqq/index.html?url=<?php $this->permalink() ?>&amp;title=<?php $this->title() ?>&amp;pics=<?php echo showThumb($this,true); ?>" class="btn social-icon social-icon-large button" target="_blank" data-tooltip="分享至QQ好友"><i class="fa fa-qq"></i></a>
							<a target="_blank" href="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=<?php $this->permalink() ?>&amp;title=<?php $this->title() ?>&amp;site=<?php $this->options->title();?>/&amp;pics=<?php echo showThumb($this,true); ?>" class="btn social-icon social-icon-large button"  data-tooltip="分享至QQ空间"><i class="fa fa-star"></i></a>
							<a target="_blank" href="https://plus.google.com/share?url=<?php $this->permalink() ?>" class="btn social-icon social-icon-large button"  data-tooltip="分享至谷歌"><i class="fa fa-google-plus"></i></a>
							<!-- modal popup -->
							<div id="weixin" class="white-popup-block mfp-hide col-lg-3 col-md-6 col-sm-7 col-xs-11 center-col bg-white text-center modal-popup-main">
                            <span class="slider-subtitle5 black-text no-margin-bottom">微信扫一扫查看</span>
                            <p class="margin-four"><img src="//pan.baidu.com/share/qrcode?w=500&h=500&url=<?php $this->permalink() ?>" alt="<?php $this->title() ?>"></p>
                            <a class="highlight-button btn btn-very-small button popup-modal-dismiss no-margin" href="#">关闭</a>
							</div>
							<!-- end modal popup -->
                        </div>
                        <!-- end social icon -->
                        <!-- comments  -->
						<?php $this->need('comments.php'); ?>
						<!-- end comments  -->
                    </div>
                    <!-- end content  -->
                    <!-- sidebar  -->
                    <div class="col-md-3 col-sm-4 col-md-offset-1 xs-margin-top-ten sidebar">
                    <?php $this->need('sidebar.php'); ?>
					</div>
                    <!-- end sidebar  -->
                </div>
            </div>
        </section>
        <!-- end content section -->
<?php $this->need('footer.php'); ?>